package trustedPlatformBackup;

import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;

import org.eclipse.swt.widgets.List;

public class CDataHandler {

	
	public ArrayList getDateListe(){
		
		return null;
		
	}
	public ArrayList getTimeListe(){
		return null;
		
	}
	public ArrayList fillFolderTree(){
		return null;
		
	}
	public ArrayList<File> fillFileList(List wFileList, String strFolder){
		wFileList.removeAll();
		ArrayList<String> fileList = getCMDOutput("ls "+strFolder+" -agGh1Q");
		
		Iterator<String> itr = fileList.iterator();
		while (itr.hasNext()) {
			String element = itr.next();
		    //wFileList.add(element);
		}
		File myDir = new File(strFolder);   
		
		File[] contents = myDir.listFiles();
		if (contents!=null){
	    for (File file : contents){
	    	wFileList.add(file.getName());
	    }
		}
		wFileList.getParent().layout();
		return null;
		
	}
	private ArrayList<String> getCMDOutput(String string) {
		// TODO Auto-generated method stub
		return null;
	}
	
	
}
